Star (-) Watch (-)

Blog

Where to run node.js

A lot of the confusion for newcomers to Node is misunderstanding exactly what it is. The description on nodejs.org definitely doesn't help.

An important thing to realize is that Node is not a webserver. By itself it doesn't do anything. It doesn't work like Apache. There is no config file where you point it to you HTML files. If you want it to be a HTTP server, you have to write an HTTP server (with the help of its built-in libraries). Node.js is just another way to execute code on your computer. It is simply a JavaScript runtime.

A nice tutorial How to Deploy Node JS Applications, With Examples

You'll need to have your non-node application on port 9000 (for Apache, this will be in /etc/apache2/ports.conf and in your sites-available file for your site), and you'll need your node application to listen on 8080. You'll also need to set up DNS 'A' records for the different hostnames you'll be using for your servers.

Companies like Heroku allow for automated deployment of apps from the desktop to the cloud. Nodejitsu provides a tool called jitsu that makes deploying an Node.js application super simple. You can install jitsu with npm.

npm install jitsu -g Heroku How To Getting started with jitsu

Use monit, forever, upstart or systemd to start your node server. Use Varnish or HAProxy or Nginx (Nginx not work with websockets).

http://blog.modulus.io/absolute-beginners-guide-to-nodejs

https://gun.io/blog/tutorial-deploy-node-js-server-with-example/

https://devcenter.heroku.com/articles/getting-started-with-nodejs

http://scripting.com/2014/02/06/herokuForPoetsBeta.html